Logical Programming in c language